import { resolve } from "node:path";
import { defineConfig } from "vite";

export default defineConfig(({mode}) => {
  return {
    build: {
      emptyOutDir: false,
      outDir: "dist",
      minify: false,
      lib: {
        entry: resolve(__dirname, `./src/${mode}.js`),
        formats: ["es"],
        name: mode,
        fileName: () => `${mode}.js`,
      },
    },
  }
});
